package com.xymtop.Service;

import com.xymtop.Entity.Major;
import com.xymtop.Server.Util.DBService;

import java.util.List;

/**
 * @ClassName : Major
 * @Description : 专业的服务
 * @Author : 肖叶茂
 * @Date: 2022/12/13  17:21
 */
public class MajorService {
    public List<Object> getList(String cid) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        List<Object> objects = DBService.Get("SELECT * FROM `javaweb`.`major` where cid = "+cid, Major.class.getCanonicalName());
        if(!objects.isEmpty()){
            return  objects;
        }else {
            return null;
        }
    }
}
